A computer network is a collection of interconnected network devices that exchange data and share resources. In a packet-based network, such as the Internet, the network devices communicate data by dividing the data into small blocks called packets. The packets are individually routed across the network from a source device to a destination device. The destination device extracts the data from the packets and assembles the data into its original form.
When two network devices communicate, the devices establish a communication session using a communication protocol, such as the Transmission Control Protocol (TCP). Network devices, such as routers and switches, forward packet flows associated with the communication session through the physical network that connects the devices. Each TCP session, for example, typically includes two packet flows in opposite directions between the network devices. Each flow of packets between the devices for a TCP session is commonly referred to as a TCP flow or a TCP stream.